package com.easyaccount.dao;

import com.easyaccount.model.Dept;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DeptMapper {
    int deleteByPrimaryKey(Integer deptId);

    int insert(Dept record);

    int insertSelective(Dept record);

    Dept selectByPrimaryKey(Integer deptId);

    int updateByPrimaryKeySelective(Dept record);

    int updateByPrimaryKey(Dept record);

    List<Dept> selectByName(@Param("start") int start, @Param("size") int size, @Param("deptName") String deptName);

    List<Dept> selectAll();

    int selectByNameCount(@Param("deptName") String deptName);

    int selectByCodeCount(@Param("deptCode") String code);

    int selectByIdAndNameCount(Dept dept);

    int selectByIdAndCodeCount(Dept dept);

    List<Dept> selectByParentId(@Param("parentId") Integer parentId);

}